#ifndef TOBIIDEVICEBASE_H
#define TOBIIDEVICEBASE_H

#include "../IODeviceWithoutThreadSupport.h"
#include "3rd/libtobii/include/EyeX.h"

class TobiiDeviceBase :
	public IODeviceWithoutThreadSupport
{
public:
	TobiiDeviceBase(IODeviceContext* context);
	virtual ~TobiiDeviceBase();

	virtual void TX_CALLCONVENTION OnEngineConnectionStateChanged(TX_CONNECTIONSTATE connectionState, TX_USERPARAM userParam){}
	virtual void TX_CALLCONVENTION OnSnapshotCommitted(TX_CONSTHANDLE hAsyncData, TX_USERPARAM param){}
	virtual void TX_CALLCONVENTION OnEvent(TX_CONSTHANDLE hAsyncData, TX_USERPARAM userParam){}

	bool RegisterConnectionStateChangedHandler();
	bool RegisterSnapshotCommittedHandler();
	bool RegisterEventHandler();

protected:

	TX_CONTEXTHANDLE m_hContext;
	TX_TICKET m_hConnectionStateChangedTicket;
	TX_TICKET m_hEventHandlerTicket;
};

#endif
